package com.example.administrator.School.fragment;


import android.content.Context;
import android.content.Intent;
import android.graphics.Color;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.support.v4.app.Fragment;
import android.support.v4.view.ViewPager;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextSwitcher;
import android.widget.TextView;
import android.widget.Toast;
import android.widget.ViewSwitcher;

import com.bumptech.glide.Glide;
import com.example.administrator.School.HuoDongActivity;
import com.example.administrator.School.R;
import com.example.administrator.School.TongZhiActivity;
import com.example.administrator.School.adpter.HorizontalListView;
import com.example.administrator.School.adpter.HorizontalListViewAdapter;
import com.example.administrator.School.adpter.TeaNetPageAdapter;
import com.example.administrator.School.indicator.ZoomIndicator;
import com.example.administrator.School.until.BannerViewPager;
import com.example.administrator.School.until.BaseFragment;
import com.example.administrator.School.until.GlideImageLoader;
import com.example.administrator.School.until.PageBean;
import com.example.administrator.School.until.PageHelperListener;
import com.youth.banner.Banner;

import java.util.ArrayList;
import java.util.List;

import butterknife.OnClick;

/**
 * 课程表的fragment
 */
public class fourFragment extends BaseFragment {


    public HorizontalListView hListView;

    HorizontalListViewAdapter hListViewAdapter;
    private static final int[] RESID = {
            R.mipmap.tianqi,
            R.mipmap.tianqi,
            R.mipmap.tianqi,
    };
    private static final String[] TEXT = {"图像处理", "LSB开发", "游戏开发"};

    @Override
    protected int getLayoutId() {
        return R.layout.fragment_four;
    }

    @Override
    public void onDestroy() {
        // 停止滚动
        super.onDestroy();
    }

    @Override
    protected void initWidget(View root) {
        super.initWidget(root);
        hListView = (HorizontalListView) root.findViewById(R.id.horizon_listview);
        String[] titles = {"", "", "", "", "", "","", "", "", ""};
        final int[] ids = {R.drawable.tx, R.drawable.tx,
                R.drawable.tx, R.drawable.tx,
                R.drawable.tx, R.drawable.tx,R.drawable.tx, R.drawable.tx,R.drawable.tx, R.drawable.tx};
        hListViewAdapter = new HorizontalListViewAdapter(getActivity(),titles,ids);
        hListView.setAdapter(hListViewAdapter);
    }
    //进入课程表详情页面
//    @OnClick(R.id.detail)
//    void detail(){
//        startActivity(new Intent(getContext(), KcbActivity.class));
//    }

    @Override
    protected void initData() {
        super.initData();
    }

    @Override
    public void onResume() {
        super.onResume();
    }

    @Override
    public void onPause() {
        super.onPause();
    }


    @OnClick(R.id.huodong)
    void huodong(){
        startActivity(new Intent(getContext(), HuoDongActivity.class));
    }

    @OnClick(R.id.tongzhi)
    void tongzhi(){
        startActivity(new Intent(getContext(), TongZhiActivity.class));
    }
}
